/*
** get_key.c for get_key in /home/comet_a//afs/local/sys_unix/my_select
** 
** Made by alexandre comet
** Login   <comet_a@epitech.net>
** 
** Started on  Thu Jan 12 11:02:34 2012 alexandre comet
** Last update Fri Jan 13 11:41:37 2012 alexandre comet
*/

#include	<unistd.h>

void		my_putchar(char c)
{
  write(1, &c, 1);
}

int		my_strlen(char *str)
{
  int		i;

  i = 0;
  while (str[i])
    i++;
  return (i);
}

void		my_putstr(char *str)
{
  write(1, str, my_strlen(str));
}

int		main()
{
  char		buff[1024];
  int		r;

  while (1)
    {
      my_putstr("Entrer du texte : ");
      r = read(0, buff, 1024);
      buff[r] = '\0';
      my_putstr(buff);
    }
  return (0);
}
